home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / demos / 8 / readme.doc / status.doc < prev    next >
Encoding:
Text File  |  1985-06-09  |  3.6 KB  |  106 lines

  1.          Brief description of 4xFORTH Status Commands
  2.  
  3.  
  4. Overview
  5. --------
  6.     A number of commands are available which print information
  7.     about the current state of the 4xFORTH system.  Among them
  8.     are:
  9.  
  10.             WHERE or W
  11.             BUFFERS or B
  12.             ORDER
  13.             .S
  14.             VLIST
  15.  
  16. WHERE or W<cr>
  17. -------------
  18.     Prints a status report on the screen which gives a substantial
  19.     amount of information about the current state of the 4xFORTH
  20.     system.  It is fairly self-explanatory.
  21.  
  22.  
  23. BUFFERS or B<cr>
  24. ----------------
  25.     Prints the contents of the system mass storage buffer table.
  26.     The information for a single buffer table entry in printed
  27.     per line.  The cell after the ":" in a line is the actual
  28.     address of the 1024 byte buffer which may contain a block
  29.     from the mass storage device.  The second element is the 
  30.     current block number from which the data in the buffer came.
  31.     The value -1 in this cell indicates that this buffer is
  32.     empty.  The last cell in the line contains the value in the
  33.     update/lock word for the buffer.  A value of 0 indicates that
  34.     the buffer has not been updated and is not locked to a specific
  35.     task or user.  A value other than 0 or -1 in this cell can be
  36.     construed as the address of the user table of the user that
  37.     has locked this buffer.
  38.  
  39.  
  40. ORDER
  41. -----
  42.     4xFORTH uses "only" concept vocabularies.  A complete explanation
  43.     of the approach can be found in the Experimental Proposals section
  44.     of the 83 FORTH Standard or in the real 4xFORTH documentation.  The
  45.     "only" concept allows the user to view the name of the vocabulary
  46.     in which compilation is currently taking place, and the names of the
  47.     vocabularies that are currently being searched during compilation or
  48.     finding of definitions and variables.  This is a MAJOR improvement
  49.     in allowing the programmer to know what he is actually doing.
  50.  
  51.     The definition ORDER prints the current compilation and searched
  52.     vocabularies by name.
  53.  
  54.  
  55.  .S
  56. ----
  57.  
  58.     This is a nondestructive print of the stack in top down order.  It can
  59.     be executed from the keyboard or placed in programs as a snapshot to
  60.     show the state of things.  The print is done top elements over those
  61.     underneath rather than from left to right.  There are arguments in
  62.     favor of either approach, if you don't like this one ... make your
  63.     own.
  64.  
  65.  
  66.  
  67. VLIST
  68. -----
  69.     The actual vocabulary structure used by 4xFORTH is simple.  It
  70.     is designed to allow searches to occur with utmost speed.  Every
  71.     vocabulary has a table associated with it.  The table contains
  72.     a pointer to the vocabulary name string, a base address for the
  73.     threads in the vocabulary, and 16 thread pointers.
  74.  
  75.     The search algorithm actually uses only one of the thread pointers.
  76.     The thread into which a new definition is placed is based on the
  77.     low 4 bits of the first character.  Thus, you will find all of the
  78.     definitions beginning with W in the same thread.
  79.  
  80.     VLIST is the utility which allows the contents of a vocabulary to be
  81.     printed.  It requires the base address of table that defines the
  82.     vocabulary, and it prints the contents thread by thread.  The call is:
  83.  
  84.             <vocabulary table base address> VLIST <cr>
  85.  
  86.     In practice, the vocabulary table base address is gotten from the
  87.     structures comprising the "only" vocabulary pointers for the CURRENT
  88.     compilation vocabulary and the search order.  Some examples:
  89.  
  90.  
  91.         Comilation Vocabulary
  92.         -----------------------------------------------------
  93.             CURRENT @   VLIST <cr>
  94.  
  95.  
  96.         Search Order
  97.         -----------------------------------------------------
  98.             first element        CONTEXT @ @     VLIST <cr>
  99.             second element        CONTEXT @ 4 + @ VLIST <cr>
  100.             third element        CONTEXT @ 8 + @ VLIST <cr>
  101.                     and so on ...
  102.  
  103.  
  104.  
  105.  
  106.     ə